* Figures reported in text -- differences in means across corresponding treatment *

* Figure 3: Difference in accuracy perceptions measured on a 4-point scale *
use  "KK_corrections_POQ_replication_data.dta", clear

gen n = _n
gen diff = .
gen l = .
gen u = .
gen sediff = .
gen category_action = .
gen headline = .

ttest accuracy if GA==1 & simple == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 3
replace sediff = r(se) if n == 3
replace headline = 1 if n == 3
replace category_action = 1 if n == 3

ttest accuracy if GA==1 & enhanced == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 6
replace sediff = r(se) if n == 6
replace headline = 1 if n == 6
replace category_action = 2 if n == 6

ttest accuracy if testing==1 & simple == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 2
replace sediff = r(se) if n == 2
replace headline = 1 if n == 2
replace category_action = 1 if n == 2

ttest accuracy if testing==1 & enhanced == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 5
replace sediff = r(se) if n == 5
replace headline = 1 if n == 5
replace category_action = 2 if n == 5

ttest accuracy if fiveg==1 & simple == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 1
replace sediff = r(se) if n == 1
replace headline = 1 if n == 1
replace category_action = 1 if n == 1

ttest accuracy if fiveg==1 & enhanced ==1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 4
replace sediff = r(se) if n == 4
replace headline = 1 if n == 4
replace category_action = 2 if n == 4


replace l = diff-1.96*(sediff)
replace u = diff+1.96*(sediff)


gen x = _n
replace n = . if n > 6
*separate diff, by(category_action)

twoway (dot diff x if n < 4, horizontal ndots(0) dcolor(white) symbol(circle) color(black)) ///
(rcap u l x if n < 4, horizontal color(black)), yti("") graphregion(color(white)) ///
xlabel(-.5 -.4 -.3 -.2 -.1 0 .1 .2 .3) ///
ylabel(1 "          5G tag" 2 "          Testing tag" 3 "          GA tag", angle(0)) xline(0) legend(off) ///
 xti(" " "Difference in Accuracy Perception vs. Control") saving(fig3tag.gph, replace) ti("Experiment 1", size(medsmall))


twoway (dot diff x if n > 3 & n <=6, horizontal ndots(0) dcolor(white) symbol(circle) color(black)) ///
(rcap u l x if n > 3 & n <=6, horizontal color(black)), yti("") graphregion(color(white)) ///
xlabel(-.5 -.4 -.3 -.2 -.1 0 .1 .2 .3) ///
ylabel(6 "GA factcheck" 5 "Testing factcheck" 4 "5G factcheck", angle(0)) xline(0) legend(off) ///
 xti(" " "Difference in Accuracy Perception vs. Control") saving(fig3check.gph, replace) ti("Experiment 2", size(medsmall))

graph combine fig3tag.gph fig3check.gph, graphregion(color(white))  rows(2)


* Figure 4 -- differences in percentage saying they would share the headline *

use  "KK_corrections_POQ_replication_data.dta", clear

gen n = _n
gen diff = .
gen l = .
gen u = .
gen sediff = .
gen category_action = .
gen headline = .

ttest share if GA==1 & simple == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 3
replace sediff = r(se) if n == 3
replace headline = 1 if n == 3
replace category_action = 1 if n == 3

ttest share if GA==1 & enhanced == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 6
replace sediff = r(se) if n == 6
replace headline = 1 if n == 6
replace category_action = 2 if n == 6

ttest share if testing==1 & simple == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 2
replace sediff = r(se) if n == 2
replace headline = 1 if n == 2
replace category_action = 1 if n == 2

ttest share if testing==1 & enhanced == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 5
replace sediff = r(se) if n == 5
replace headline = 1 if n == 5
replace category_action = 2 if n == 5

ttest share if fiveg==1 & simple == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 1
replace sediff = r(se) if n == 1
replace headline = 1 if n == 1
replace category_action = 1 if n == 1

ttest share if fiveg==1 & enhanced ==1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 4
replace sediff = r(se) if n == 4
replace headline = 1 if n == 4
replace category_action = 2 if n == 4


replace l = diff-1.96*(sediff)
replace u = diff+1.96*(sediff)


gen x = _n
replace n = . if n > 6
*separate diff, by(category_action)

twoway (dot diff x if n < 4, horizontal ndots(0) dcolor(white) symbol(circle) color(black)) ///
(rcap u l x if n < 4, horizontal color(black)), yti("") graphregion(color(white)) ///
xlabel(-.21 " " -.2 "-20%" -.15 "-15%" -.1 "-10%" -.05 "-5%" 0 "0%" .05 "5%" .1 "10%" .15 "15%" .16 " ") ///
ylabel(1 "          5G tag" 2 "          Testing tag" 3 "          GA tag", angle(0)) xline(0) legend(off) ///
 xti(" " "Difference in % Share vs. Control") saving(fig4tag.gph, replace) ti("Experiment 1", size(medsmall))


twoway (dot diff x if n > 3 & n <=6, horizontal ndots(0) dcolor(white) symbol(circle) color(black)) ///
(rcap u l x if n > 3 & n <=6, horizontal color(black)), yti("") graphregion(color(white)) ///
xlabel( -.21 " " -.2 "-20%" -.15 "-15%" -.1 "-10%" -.05 "-5%" 0 "0%" .05 "5%" .1 "10%" .15 "15%" .16 " ") ///
ylabel(6 "GA factcheck" 5 "Testing factcheck" 4 "5G factcheck", angle(0)) xline(0) legend(off) ///
 xti(" " "Difference in % Share vs. Control") saving(fig4check.gph, replace) ti("Experiment 2", size(medsmall))

graph combine fig4tag.gph fig4check.gph, graphregion(color(white))  rows(2)

* Figure 5: Testing for Partisan Backfire Effects (OLS models using 4-point DV, limited to Democrats and Republicans only) *
* Experiment 1 *
reg accuracy i.GA_c##dem3    if GA == 1 & simple == 1 & (dem3==1|gop3==1)
margins, at(dem3=(0(1)1) GA_c=(0(1)1)) vsquish atmeans
marginsplot, x(GA_c)  recast(line)  play("poq_party.grec") yti("Accuracy Perception" " ") ylabel(2 2.25 2.5 2.75 3 3.25, labsize(small)) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Tag") xti("") level(95) ti("GA Rate: False Tag") saving(accuracy_GA.gph, replace) legend(rows(1))
*marginsplot, x(GA_c)  recast(line)  play("Binary by party.grec") yti("Accuracy Perception" " ") ylabel(2 2.25 2.5 2.75 3 3.25) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Flag") xti("") level(95) ti("GA Rate: False Tag") saving(accuracy_GA.gph, replace) legend(rows(1))
* Note table presents interactions with gop3 for testing headline, but of course model is identical if interacted with dem3, and this works better with the .grec file to clean up graphics *

* To replicate the changes in graph from the .grec file, simply delete the impossible series where dem3 and gop3 are both == 1 and reformat lines to distinguish across partisan series *
reg accuracy   i.testing_c##dem3    if testing == 1 & simple == 1 & (dem3==1|gop3==1)
margins, at(dem3=(0(1)1) testing_c=(0(1)1)) vsquish atmeans
marginsplot, x(testing_c)  recast(line) play("poq_party.grec")   yti("Accuracy Perception" " ") ylabel(2 2.25 2.5 2.75 3 3.25, labsize(small)) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Tag") xti("") level(95) saving(accuracy_testing.gph, replace) ti("US Testing: False Tag") legend(rows(1)) 
*marginsplot, x(testing_c)  recast(line)  play("Binary by party.grec") yti("Accuracy Perception" " ") ylabel(2 2.25 2.5 2.75 3 3.25) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Flag") xti("") level(95) saving(accuracy_testing.gph, replace) ti("US Testing: False Tag") legend(rows(1)) 

* Experiment 2 *
reg accuracy  i.GA_c##dem3    if GA == 1 & enhanced == 1 & (dem3==1|gop3==1)
margins, at(dem3=(0(1)1) GA_c=(0(1)1)) vsquish atmeans
marginsplot, x(GA_c)  recast(line) play("poq_party.grec")  yti("Accuracy Perception" " ") ylabel(2 2.25 2.5 2.75 3 3.25, labsize(small)) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Factcheck") xti("") level(95) ti("GA Rate: Factcheck") saving(accuracy_GA_enhanced.gph, replace) legend(rows(1))
* To replicate the changes in graph from the .grec file, simply delete the impossible series where dem3 and gop3 are both == 1 and reformat lines to distinguish across partisan series *
reg accuracy   i.testing_c##dem3     if testing == 1 & enhanced == 1 & (dem3==1|gop3==1)
margins, at(dem3=(0(1)1) testing_c=(0(1)1)) vsquish atmeans
marginsplot, x(testing_c)  recast(line) play("poq_party.grec")  yti("Accuracy Perception" " ") ylabel(2 2.25 2.5 2.75 3 3.25, labsize(small)) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Factcheck") xti("") level(95) saving(accuracy_testing_enhanced.gph, replace) ti("US Testing: Factcheck") legend(rows(1)) 
grc1leg2 accuracy_GA.gph accuracy_testing.gph accuracy_GA_enhanced.gph accuracy_testing_enhanced.gph, graphregion(color(white)) 

* Tables Reported in Supporting Information *

* SI Table 1 *
* Study 1 demos *
sum black if simple == 1
sum latino if simple == 1
sum female if simple == 1
tab education if simple == 1
sum age if simple == 1, detail 
sum gop3 if simple == 1
sum dem3 if simple == 1
tab ideology if simple == 1
* Study 2 demos *
sum black if enhanced == 1
sum latino if enhanced == 1
sum female if enhanced == 1
tab education if enhanced == 1
sum age if enhanced == 1, detail 
sum gop3 if enhanced == 1
sum dem3 if enhanced == 1
tab ideology if enhanced == 1

* SI Table 2 *
tabstat dem3 gop3 education age female black latino social_news sci_know if simple == 1, by(category) stat(mean) save
tabstat dem3 gop3 education age female black latino social_news sci_know if simple == 1, by(category) stat(n) 

oneway dem3 category if simple == 1
oneway gop3 category if simple == 1
oneway education category if simple == 1
oneway age category if simple == 1
oneway female category if simple == 1
oneway black category if simple == 1
oneway latino category if simple == 1
oneway social_news category if simple == 1
oneway sci_know category if simple == 1

* SI Table 3 *
tabstat dem3 gop3 education age female black latino social_news sci_know if enhanced == 1, by(category) stat(mean) save
tabstat dem3 gop3 education age female black latino social_news sci_know if enhanced == 1, by(category) stat(n) 

oneway dem3 category if enhanced == 1
oneway gop3 category if enhanced == 1
oneway education category if enhanced == 1
oneway age category if enhanced == 1
oneway female category if enhanced == 1
oneway black category if enhanced == 1
oneway latino category if enhanced == 1
oneway social_news category if enhanced == 1
oneway sci_know category if enhanced == 1

* SI Table 4 *
reg accuracy correction  dem3 gop3 education age female black latino   if GA == 1 & simple == 1
outreg2 using sitable4, word p dec(2) label replace
reg accuracy correction   dem3 gop3 education age female black latino    if testing == 1 & simple == 1
outreg2 using sitable4, word p dec(2) label append
reg accuracy correction  dem3 gop3 education age female black latino     if fiveg == 1 & simple == 1
outreg2 using sitable4, word p dec(2) label append

* SI Table 5 *
reg accuracy correction  dem3 gop3 education age female black latino   if GA == 1 & enhanced == 1
outreg2 using sitable5, word p dec(2) label replace
reg accuracy correction   dem3 gop3 education age female black latino    if testing == 1 & enhanced == 1
outreg2 using sitable5, word p dec(2) label append
reg accuracy correction  dem3 gop3 education age female black latino     if fiveg == 1 & enhanced == 1
outreg2 using sitable5, word p dec(2) label append

* SI Table 6 *
gen correctionxgop3 = correction*gop3
label var correctionxgop3 "Correction X Republican"
gen correctionxdem3 = correction*dem3
label var correctionxdem3 "Correction X Democrat"
reg accuracy correction  correctionxdem3  dem3   if GA == 1 & simple == 1 & (dem3==1|gop3==1)
outreg2 using sitable6, word p dec(2) label append
reg accuracy  correction  correctionxgop3  gop3   if testing == 1 & simple == 1 & (dem3==1|gop3==1)
outreg2 using sitable6, word p dec(2) label append
reg accuracy  correction  correctionxdem3  dem3   if GA == 1 & enhanced == 1 & (dem3==1|gop3==1)
outreg2 using sitable6, word p dec(2) label append
reg accuracy  correction  correctionxgop3  gop3   if testing == 1 & enhanced == 1 & (dem3==1|gop3==1)
outreg2 using sitable6, word p dec(2) label append

* Figures in Supporting Information *
* SI Figure 1 -- differences in % believing headline accurate *
use  "KK_corrections_POQ_replication_data.dta", clear

gen n = _n
gen diff = .
gen l = .
gen u = .
gen sediff = .
gen category_action = .
gen headline = .

ttest accuracy_bin if GA==1 & simple == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 3
replace sediff = r(se) if n == 3
replace headline = 1 if n == 3
replace category_action = 1 if n == 3

ttest accuracy_bin  if GA==1 & enhanced == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 6
replace sediff = r(se) if n == 6
replace headline = 1 if n == 6
replace category_action = 2 if n == 6

ttest accuracy_bin  if testing==1 & simple == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 2
replace sediff = r(se) if n == 2
replace headline = 1 if n == 2
replace category_action = 1 if n == 2

ttest accuracy_bin  if testing==1 & enhanced == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 5
replace sediff = r(se) if n == 5
replace headline = 1 if n == 5
replace category_action = 2 if n == 5

ttest accuracy_bin  if fiveg==1 & simple == 1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 1
replace sediff = r(se) if n == 1
replace headline = 1 if n == 1
replace category_action = 1 if n == 1

ttest accuracy_bin  if fiveg==1 & enhanced ==1, by(correction)
replace diff = r(mu_2)-r(mu_1) if n == 4
replace sediff = r(se) if n == 4
replace headline = 1 if n == 4
replace category_action = 2 if n == 4


replace l = diff-1.96*(sediff)
replace u = diff+1.96*(sediff)


gen x = _n
replace n = . if n > 6
*separate diff, by(category_action)

twoway (dot diff x if n < 4, horizontal ndots(0) dcolor(white) symbol(circle) color(black)) ///
(rcap u l x if n < 4, horizontal color(black)), yti("") graphregion(color(white)) ///
xlabel(-.3 "-30%" -.2 "-20%" -.1 "-10%" 0 "0%" .1 "10%" .2 "20%" ) ///
ylabel(1 "          5G tag" 2 "          Testing tag" 3 "          GA tag", angle(0)) xline(0) legend(off) ///
 xti(" " "Difference in % Believing Very or Somewhat Accurate vs. Control") saving(sifig1tag.gph, replace) ti("Experiment 1", size(medsmall))


twoway (dot diff x if n > 3 & n <=6, horizontal ndots(0) dcolor(white) symbol(circle) color(black)) ///
(rcap u l x if n > 3 & n <=6, horizontal color(black)), yti("") graphregion(color(white)) ///
xlabel(-.3 "-30%" -.2 "-20%" -.1 "-10%" 0 "0%" .1 "10%" .2 "20%" ) ///
ylabel(6 "GA factcheck" 5 "Testing factcheck" 4 "5G factcheck", angle(0)) xline(0) legend(off) ///
 xti(" " "Difference in % Believing Very or Somewhat Accurate vs. Control") saving(sifig1check.gph, replace) ti("Experiment 2", size(medsmall))

graph combine sifig1tag.gph sifig1check.gph, graphregion(color(white))  rows(2)

* SI Figure 2: Testing for partisan moderation in sharing propensity *
* Experiment 1 *
logit share i.GA_c##dem3    if GA == 1 & simple == 1 & (dem3==1|gop3==1)
margins, at(dem3=(0(1)1) GA_c=(0(1)1)) vsquish atmeans
marginsplot, x(GA_c)  recast(line)  play("poq_party.grec") yti("Probability of Sharing" " ") ylabel(.1 .2 .3 .4 .5, labsize(small)) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Tag") xti("") level(95) ti("GA Rate: False Tag") saving(accuracy_GA.gph, replace) legend(rows(1))
* Note table presents interactions with gop3 for testing headline, but of course model is identical if interacted with dem3, and this works better with the .grec file to clean up graphics *
* To replicate the changes in graph from the .grec file, simply delete the impossible series where dem3 and gop3 are both == 1 and reformat lines to distinguish across partisan series *
logit share   i.testing_c##dem3    if testing == 1 & simple == 1 & (dem3==1|gop3==1)
margins, at(dem3=(0(1)1) testing_c=(0(1)1)) vsquish atmeans
marginsplot, x(testing_c)  recast(line) play("poq_party.grec")   yti("Probability of Sharing" " ") ylabel(.1 .2 .3 .4 .5, labsize(small)) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Tag") xti("") level(95) saving(accuracy_testing.gph, replace) ti("US Testing: False Tag") legend(rows(1)) 
* Experiment 2 *
logit share  i.GA_c##dem3    if GA == 1 & enhanced == 1 & (dem3==1|gop3==1)
margins, at(dem3=(0(1)1) GA_c=(0(1)1)) vsquish atmeans
marginsplot, x(GA_c)  recast(line) play("poq_party.grec")  yti("Probability of Sharing" " ") ylabel(.1 .2 .3 .4 .5, labsize(small)) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Factcheck") xti("") level(95) ti("GA Rate: Factcheck") saving(accuracy_GA_enhanced.gph, replace) legend(rows(1))
* To replicate the changes in graph from the .grec file, simply delete the impossible series where dem3 and gop3 are both == 1 and reformat lines to distinguish across partisan series *
logit share  i.testing_c##dem3     if testing == 1 & enhanced == 1 & (dem3==1|gop3==1)
margins, at(dem3=(0(1)1) testing_c=(0(1)1)) vsquish atmeans
marginsplot, x(testing_c)  recast(line) play("poq_party.grec")  yti("Probability of Sharing" " ") ylabel(.1 .2 .3 .4 .5, labsize(small)) xscale(range(-.1 1.1))  xlabel(0 "Fake" 1 "Factcheck") xti("") level(95) saving(accuracy_testing_enhanced.gph, replace) ti("US Testing: Factcheck") legend(rows(1)) 
grc1leg2 accuracy_GA.gph accuracy_testing.gph accuracy_GA_enhanced.gph accuracy_testing_enhanced.gph, graphregion(color(white)) 

